-- 基础信息
local base_info = {
	group_id = 111102042
}

-- DEFS_MISCS
local defs = {
	maxPlayerEnergyLev = 3,

    -- 出了这个区域，玩家身上捡的能量块特效就无了
	titanRegion = 42017,

    -- todo: 保底判断一下各个位置的config id对应的是否是正确的gadget id
    cells = {
        -- 每一项均需严格遵循下述格式，没有line或者node则留空，不能不创建！
        -- [cell_config_id] = {cell = cell_config_id, lines = {line01_config_id, line02_config_id, ...}, nodes = {node01_config_id, ...}}
        [42002] = {cell = 42002, lines = {42003, 42004}, nodes = {42007}},
        [42006] = {cell = 42006, lines = {42005}, nodes = {42007}},
        [42018] = {cell = 42018, lines = {42003}, nodes = {}},
        [42019] = {cell = 42019, lines = {42021, 42022}, nodes = {}},
        [42020] = {cell = 42020, lines = {42021}, nodes = {}},
    },

    -- 指定初始激活的电池id，未指定则默认初始未激活
    activeCells = {42002},

    -- 指定探索机关，这些机关在任何时候都根据自身能量块做出反应，电池全亮不会改变它们的状态
    optionalMachines = {42001},
}

--================================================================
-- 
-- 配置
-- 
--================================================================

-- 怪物
monsters = {
}

-- NPC
npcs = {
}

-- 装置
gadgets = {
	[42001] = { config_id = 42001, gadget_id = 70350439, pos = { x = 1466.329, y = 271.216, z = -1771.118 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42002] = { config_id = 42002, gadget_id = 70350442, pos = { x = 1482.581, y = 271.806, z = -1786.060 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42003] = { config_id = 42003, gadget_id = 70350443, pos = { x = 1479.609, y = 270.862, z = -1785.521 }, rot = { x = 0.000, y = 282.001, z = 0.000 }, level = 1 },
	[42004] = { config_id = 42004, gadget_id = 70350443, pos = { x = 1485.615, y = 270.768, z = -1785.958 }, rot = { x = 0.000, y = 267.386, z = 0.000 }, level = 1 },
	[42005] = { config_id = 42005, gadget_id = 70350443, pos = { x = 1491.161, y = 270.715, z = -1785.826 }, rot = { x = 0.000, y = 266.581, z = 0.000 }, level = 1 },
	[42006] = { config_id = 42006, gadget_id = 70350442, pos = { x = 1494.448, y = 271.407, z = -1785.746 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42007] = { config_id = 42007, gadget_id = 70350446, pos = { x = 1488.356, y = 270.925, z = -1786.114 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42008] = { config_id = 42008, gadget_id = 70350449, pos = { x = 1502.808, y = 269.037, z = -1774.339 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42009] = { config_id = 42009, gadget_id = 70350449, pos = { x = 1494.969, y = 271.337, z = -1794.524 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42010] = { config_id = 42010, gadget_id = 70350449, pos = { x = 1499.948, y = 271.338, z = -1795.187 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42011] = { config_id = 42011, gadget_id = 70350449, pos = { x = 1504.545, y = 269.634, z = -1781.006 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42012] = { config_id = 42012, gadget_id = 70350449, pos = { x = 1510.477, y = 268.698, z = -1773.074 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42013] = { config_id = 42013, gadget_id = 70350449, pos = { x = 1495.762, y = 269.708, z = -1779.766 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42014] = { config_id = 42014, gadget_id = 70350449, pos = { x = 1503.294, y = 270.533, z = -1789.696 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42015] = { config_id = 42015, gadget_id = 70350449, pos = { x = 1484.253, y = 269.656, z = -1778.450 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42016] = { config_id = 42016, gadget_id = 70350449, pos = { x = 1482.745, y = 272.139, z = -1796.890 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42018] = { config_id = 42018, gadget_id = 70350442, pos = { x = 1476.676, y = 271.819, z = -1784.867 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42019] = { config_id = 42019, gadget_id = 70350442, pos = { x = 1477.918, y = 273.076, z = -1794.806 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42020] = { config_id = 42020, gadget_id = 70350442, pos = { x = 1466.975, y = 273.123, z = -1792.822 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42021] = { config_id = 42021, gadget_id = 70350444, pos = { x = 1472.425, y = 272.419, z = -1793.545 }, rot = { x = 0.000, y = 278.746, z = 0.000 }, level = 1 },
	[42022] = { config_id = 42022, gadget_id = 70350445, pos = { x = 1485.215, y = 272.687, z = -1791.320 }, rot = { x = 0.000, y = 67.679, z = 0.000 }, level = 1 },
	[42023] = { config_id = 42023, gadget_id = 70350449, pos = { x = 1474.618, y = 272.631, z = -1797.479 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42024] = { config_id = 42024, gadget_id = 70350449, pos = { x = 1496.818, y = 270.649, z = -1788.490 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42025] = { config_id = 42025, gadget_id = 70350449, pos = { x = 1470.763, y = 272.443, z = -1796.531 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42027] = { config_id = 42027, gadget_id = 70350440, pos = { x = 1466.993, y = 271.243, z = -1774.492 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 },
	[42028] = { config_id = 42028, gadget_id = 70350441, pos = { x = 1467.369, y = 271.357, z = -1778.089 }, rot = { x = 0.000, y = 0.000, z = 0.000 }, level = 1 }
}

-- 区域
regions = {
	[42017] = { config_id = 42017, shape = RegionShape.SPHERE, radius = 50, pos = { x = 1479.654, y = 269.951, z = -1780.915 } }
}

-- 触发器
triggers = {
	{ config_id = 1042026, name = "GROUP_LOAD_42026", event = EventType.EVENT_GROUP_LOAD, source = "", condition = "", action = "action_EVENT_GROUP_LOAD_42026" }
}

-- 变量
variables = {
}

--================================================================
-- 
-- 初始化配置
-- 
--================================================================

-- 初始化时创建
init_config = {
	suite = 1,
	end_suite = 0,
	rand_suite = false
}

--================================================================
-- 
-- 小组配置
-- 
--================================================================

suites = {
	{
		-- suite_id = 1,
		-- description = ,
		monsters = { },
		gadgets = { 42002, 42003, 42004, 42005, 42006, 42007, 42008, 42009, 42010, 42011, 42013, 42014, 42015, 42016, 42018, 42019, 42020, 42021, 42022, 42023, 42024, 42025, 42027, 42028 },
		regions = { 42017 },
		triggers = { "GROUP_LOAD_42026" },
		rand_weight = 100
	},
	{
		-- suite_id = 2,
		-- description = ,
		monsters = { },
		gadgets = { 42001, 42012 },
		regions = { },
		triggers = { },
		rand_weight = 100
	}
}

--================================================================
-- 
-- 触发器
-- 
--================================================================

-- 触发操作
function action_EVENT_GROUP_LOAD_42026(context, evt)
	-- 添加suite2的新内容
	    ScriptLib.AddExtraGroupSuite(context, 111102042, 2)
	
	return 0
end

require "V3_0/TitanEnergy"